package com.epam.task.oop.Run;

import com.epam.task.oop.medicines.Product;
import com.epam.task.oop.medicines.Recipe;

import java.io.IOException;
import java.util.Scanner;
import java.util.logging.LogManager;
import java.util.logging.Logger;

public class Runner {

    public static void main(String[] args) {
        try {
            LogManager.getLogManager().readConfiguration(
                    Runner.class.getResourceAsStream("/logging.properties"));
        } catch (IOException e) {
            System.err.println("Could not setup logger configuration: " + e.toString());
        }
        Scanner sc = new Scanner(System.in);

        System.out.println("Enter the number of aircrafts: ");
        int n = sc.nextInt();
        System.out.println("Enter the range of fuel consumption "
                + "to search (min): ");
        int min = sc.nextInt();
        System.out.println("Enter the range of fuel consumption "
                + "to search (max): ");
        int max = sc.nextInt();
        System.out.println("Enter the number of launches to make: ");
        int numOfLaunches = sc.nextInt();
        sc.close();

        Recipe products = new Recipe();

        Logger logger = Logger.getLogger(Product.class.getName());
        logger.info(products.listAllPharmacyProducts());

        logger.info(products.printTotals());

        logger.fine(products.findByPrice(min, max));

    }

}
